#region BSD license
/*
 * Copyright (c) 2008, Thomas "zeroflag" Kraemer. All rights reserved.
 * Copyright (c) 2008, Anders "anonimasu" Helin. All rights reserved.
 * Copyright (c) 2008, The zeroflag.Components.NET Team. All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without 
 * modification, are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this
 * list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, 
 * this list of conditions and the following disclaimer in the documentation 
 * and/or other materials provided with the distribution.
 * Neither the name of the zeroflag.Components.NET Team nor the names of its contributors may 
 * be used to endorse or promote products derived from this software without 
 * specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 * THE POSSIBILITY OF SUCH DAMAGE.
 */
#endregion BSD license

#region SVN Version Information
///	<file>
///		<!-- Last modification of this file: -->
///		<revision>$Rev$</revision>
///		<author>$Author$</author>
///		<id>$Id$</id>
///	</file>
#endregion SVN Version Information

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace zeroflag.Components.Logging
{
	public class LogMessage : IComparable<LogMessage>
	{
		#region Sender

		private string _Sender;

		/// <summary>
		/// The name of the sender of this message.
		/// </summary>
		public string Sender
		{
			get { return _Sender; }
			set
			{
				if ( _Sender != value )
				{
					_Sender = value;
				}
			}
		}

		#endregion Sender

		#region Time

		private DateTime _Time;

		/// <summary>
		/// When this message was sent.
		/// </summary>
		public DateTime Time
		{
			get { return _Time; }
			set
			{
				if ( _Time != value )
				{
					_Time = value;
				}
			}
		}

		#endregion Time

		#region Message

		private string _Message;

		/// <summary>
		/// The actual message.
		/// </summary>
		public string Message
		{
			get { return _Message; }
			set
			{
				if ( _Message != value )
				{
					_Message = value;
				}
			}
		}

		#endregion Message


		#region IComparable<LogMessage> Members

		public int CompareTo( LogMessage other )
		{
			if ( other == null )
				return 1;
			else
				return this.Time.CompareTo( other.Time );
		}

		#endregion
	}
}
